using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Reflection;

namespace Charisma.Conventions
{
    [ContractClass(typeof (ReferenceMemberConventionContract))]
    public interface IReferenceMemberConvention : IConvention
    {
        IEnumerable<MemberPair> Find(Type type, IEnumerable<MemberInfo> fields);
    }

    [ContractClassFor(typeof (IReferenceMemberConvention))]
    internal abstract class ReferenceMemberConventionContract : IReferenceMemberConvention
    {
        #region IReferenceMemberConvention Members

        public IEnumerable<MemberPair> Find(Type type, IEnumerable<MemberInfo> fields)
        {
            Contract.Requires(type != null);
            Contract.Requires(fields != null);
            Contract.Ensures(Contract.Result<IEnumerable<MemberPair>>() != null);
            return null;
        }

        #endregion
    }
}